package com.xzzz.irda.guardcat.server.repos.elasticsearch.pojo;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.xzzz.expand.es.core.annotation.EsId;
import com.xzzz.expand.es.core.annotation.EsIndex;
import com.xzzz.irda.guardcat.core.pojo.Alert;
import com.xzzz.irda.guardcat.core.constants.GuardcatConstant;
import lombok.Data;

import java.util.Date;

/**
 * 警告ES实体类
 *
 * @author xzzz
 */
@Data
@EsIndex(name = "index_guardcat_alert")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class AlertEsEntity {

    /**
     * 警告ID, 作为ESID
     */
    @EsId
    private String id;
    /**
     * 机器ID
     *
     * @see GuardcatConstant#MACHINE_ID
     */
    private String machineId;
    /**
     * traceId
     */
    private String traceId;
    /**
     * 应用名称 spring.application.name
     */
    private String appName;
    /**
     * 机器名称
     */
    private String hostName;
    /**
     * 环境
     */
    private String profilesActive;
    /**
     * 警告标题
     */
    private String title;
    /**
     * 警告内容
     */
    private String content;
    /**
     * 警告级别，预留
     */
    private Alert.Level level;
    /**
     * 警告时间
     */
    private Date gmtAlert;
    /**
     * 是否发送通知
     */
    private Boolean notification;
    /**
     * 警告已读
     */
    private Boolean read;


}
